Timestamps are sometimes associated with sensor samples to represent the time at which a sensor sample was generated. Such time information may, for example, be useful to determine additional information from the sensor sample, such as an orientation of an electronic device.
For example, a gyroscope is a device for measuring a rate of rotation. Gyroscopes are sometimes included in electronic devices, such as handheld electronic devices, in order to provide information about the orientation of such electronic devices. Such orientation information allows the electronic device to know information about its own physical position. The gyroscope may allow for recognition of movement within a three dimensional space. The electronic device may use such orientation information as an input signal. That is, the electronic device may be operated in a mode in which gyroscope measurements affect the operation of the electronic device.
Gyroscope output is generally representative of the amount of rotation of the gyroscope per unit time (e.g. radians/second, degrees/second, etc.). A timestamp associated with a gyroscope sample may be used when determining the orientation device from this gyroscope output. That is, the timestamp may allow the gyroscope output to be translated from a value representing the rate of rotation to another value, representing the amount of rotation from a previous reference point, thereby allowing an orientation of the electronic device to be determined. Thus, the accuracy of the timestamp associated with a gyroscope reading may affect the accuracy of the orientation determination.
A timestamp may not be generated by the same system or component that generates sample data. For example, the sample data may be generated by a sensor and a timestamp may be applied by a processor. Since processors are often performing other functions, when the timestamp is applied by a processor, the timestamp may not be applied in a timely manner, resulting in a timestamp that is not accurate.
Like reference numerals are used in the drawings to denote like elements and features.